<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/7/15
  Time: 15:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>显示所有的人员信息</title>
</head>
<body>
<a href="person?type=toAddPage">添加人员信息</a>
<%--显示所有的personinfo数据在表格中--%>
<table border="1">
    <tr>
        <td>人员编号</td>
        <td>人员名称</td>
        <td>所在区域</td>
        <td>年龄</td>
        <td>地址</td>
        <td>操作</td>
    </tr>
<%-- 使用jsp的foreach标签遍历集合personList--%>
    <c:forEach items="${personList}" var="person">
        <tr>
            <td>${person.personid}</td>
            <td>${person.personname}</td>
            <td>${person.areaname}</td>
            <td>${person.personage}</td>
            <td>${person.personaddress}</td>
<%--           添加一个删除按钮和一个编辑按钮--%>
            <td>
                <a href="person?type=toUpdatePage&personid=${person.personid}">编辑</a>
                <a href="person?type=delete&personid=${person.personid}">删除</a>
            </td>
        </tr>
    </c:forEach>


</table>
</body>

</html>
